Skip to content

Article: Find What Wakes a Windows PC With Get-WinEvent - #525

Merged
HeyItsGilbert merged 3 commits into
PowerShellOrg:mainfrom
trucule:article/find-what-wakes-a-windows-pc
Nov 4, 2026
Merged

HeyItsGilbert merged 3 commits into
PowerShellOrg:mainfrom
trucule:article/find-what-wakes-a-windows-pc

Conversation

@trucule

@trucule trucule commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Closes #428

This adds the article pitched in #428. It builds Get-SleepWakeHistory, which pairs Kernel-Power event 42 with Power-Troubleshooter event 1 to show when a PC slept, why it went to sleep, and what woke it. It then lists the scheduled tasks with WakeToRun set and the devices armed to wake the PC, and shows how to turn off each one.

The code was tested in Windows PowerShell 5.1 and PowerShell 7.6 on two Windows 11 PCs (builds 26200 and 26300), a desktop that uses S3 sleep and a Modern Standby laptop. Every output block in the article comes from those runs.

@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for powershellorg ready!

Name Link
🔨 Latest commit bb226d4
🔍 Latest deploy log https://app.netlify.com/projects/powershellorg/deploys/6aeab42f7e820cb4a2614476
😎 Deploy Preview https://deploy-preview-525--powershellorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The missing November archive _index.md causes the required validate:articles CI step to fail.

3 open issues
What changed in this PR

Adds a community troubleshooting article for Windows administrators, implementing the pitch in #428 with a PowerShell function for examining sleep and wake history.

Changes:

  • Introduces Get-SleepWakeHistory to pair sleep and wake events and report durations, reasons, and wake sources.
  • Shows how to identify and disable wake permissions for scheduled tasks and devices.
  • Documents Modern Standby, battery settings, and hibernation limitations with reported test results.

No concerns identified under the article-specific unsafe-content, AI-content-signal, or self-promotion checks. Final publication remains a maintainer decision.

File Description
content/​articles/​2026/​11/​find-what-wakes-a-windows-pc-with-get-winevent/​index.md Adds the troubleshooting article, PowerShell examples, sample output, and platform caveats.

Review effort: Balanced

trucule and others added 2 commits November 3, 2026 20:24
The validate:articles step requires an _index.md in every month folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AXY6pfEzpyB9Cjasa4B4S9
Pick the event 42 closest to SleepTime so a later sleep's event in the window isn't matched, and compute Asleep from the DateTimeOffset values so a sleep across a daylight saving change has the right length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AXY6pfEzpyB9Cjasa4B4S9
@HeyItsGilbert
HeyItsGilbert merged commit cbd77db into PowerShellOrg:main Nov 4, 2026
5 checks passed
@HeyItsGilbert

Copy link
Copy Markdown
Member

Looks good! Thanks for the submission. Consider submitting an author bio https://github.com/PowerShellOrg/PowerShellOrgWebsite/blob/main/CONTRIBUTING.md#adding-your-author-profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Article] Combining Event Logs

3 participants